#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"

trigger-ps-pre-deploy() {
  declare desc="ps pre-deploy plugin trigger"
  declare trigger="pre-deploy"
  declare APP="$1" IMAGE_TAG="$2"

  extract_procfile "$APP" "$IMAGE_TAG"
  generate_scale_file "$APP" "$IMAGE_TAG"
}

trigger-ps-pre-deploy "$@"
